how to create a child process using exec method